<?	
//henter de 11 temp + 11 pot rolls
$temp['1'] = $this->input->post('temp_1');
$temp['2'] = $this->input->post('temp_2');
$temp['3'] = $this->input->post('temp_3');
$temp['4'] = $this->input->post('temp_4');
$temp['5'] = $this->input->post('temp_5');
$temp['6'] = $this->input->post('temp_6');
$temp['7'] = $this->input->post('temp_7');
$temp['8'] = $this->input->post('temp_8');
$temp['9'] = $this->input->post('temp_9');
$temp['10'] = $this->input->post('temp_10');
$temp['11'] = $this->input->post('temp_11');
$pot['1'] = $this->input->post('pot_1');
$pot['2'] = $this->input->post('pot_2');
$pot['3'] = $this->input->post('pot_3');
$pot['4'] = $this->input->post('pot_4');
$pot['5'] = $this->input->post('pot_5');
$pot['6'] = $this->input->post('pot_6');
$pot['7'] = $this->input->post('pot_7');
$pot['8'] = $this->input->post('pot_8');
$pot['9'] = $this->input->post('pot_9');
$pot['10'] = $this->input->post('pot_10');
$pot['11'] = $this->input->post('pot_11');
			

echo "<p class='rubrik'> Du har nu slået dine stats. Du skal nu vælge hvordan de ligge, så de afspejler din forestilling om din karakter.<br><br> <b>Husk at bruge hver stat netop een gang.</b></p>";
	$stat_names = array("Lu","Co","Ag","Re","Me","SD","St","Qu","Pr","Em","In");
		?>
	<form action="<? echo base_url() ?>karakterark/tilfoej_stats_ini/<? echo $id; ?>" method="post">
		<? 
		$count = 1;
		while($count < 12)
		{
			?><input type="hidden" name="temp_<? echo $count; ?>" value="<? echo $temp[$count]; ?>"><?
			$count = $count +1;
		}
		$count = 1;
		while($count < 12)
		{
			?><input type="hidden" name="pot_<? echo $count; ?>" value="<? echo $pot[$count]; ?>"><?
			$count = $count +1;
		}		
		?>
		
<table class="rubrik" style="text-align:center">
			<tr>
			<td></td>
			<td width="40px"><p class="rubrik"><b>temp</b></p></td>
			<td width="40px"><p class="rubrik"><b>pot</b></p></td>
			</tr>

			
			<? 
			$count = 1;
			while($count < 12)
			{
				//echo $stat_name[$count];
				?>
					<tr>
					<td><select name="<? echo "stat_".$count; ?>">
					<option value="tom" selected>Vælg</option>
				<?
				foreach($stat_names as $r)
				{
					?><option value="<? echo $r; ?>"><? echo $r;?></option><?
					
				}
				?>
				</select></td>
				<td><? echo $temp[$count]; ?></td>
				<td><? echo $pot[$count]; ?></td>
				</tr>
				<?
				$count = $count +1;
			}
			?>
			
			
		</table>
		<input class="submit" type=submit value="<? echo "Gem stats"; ?>"/>
	</form>

